﻿<?php //Seyret Component v.0.3//
/**
* @package Seyret
* @version 0.3
* @copyright Copyright (C) 2008 Mustafa DINDAR. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Seyret Video Component is a free software.
* See seyrettos.html for license notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );


?>
<seyretxml>
	<uservideolist>
	<?php
	foreach ($this->uservideoslist as $uservideo) {
		
		
		if ($uservideo->voteclick==0) $uservideo->voteclick=1;
		$intrating=($uservideo->votetotal/$uservideo->voteclick);
		$rating=ceil($intrating);
	?>
		
		<uservideoitem>
			<videoid><?php echo $uservideo->id; ?></videoid>
			<rating><?php echo $rating; ?></rating>
			<hits><?php echo $uservideo->hits; ?></hits>
			<videolink><![CDATA[<?php echo $uservideo->videolink; ?>]]></videolink>
			<videotitle><![CDATA[<?php echo $uservideo->videotitle; ?>]]></videotitle>
			<videodescription><![CDATA[<?php echo $uservideo->videodescription; ?>]]></videodescription>
			<addeddate><?php echo $uservideo->addeddate; ?></addeddate>
			<duration><?php echo $uservideo->duration; ?></duration>
			<videothumbnail><?php echo $uservideo->videothumbnail; ?></videothumbnail>
			<videoservertype><?php echo strtolower(str_replace(".", "", $uservideo->videoservertype)); ?></videoservertype>
		</uservideoitem>
		<?php	

		
		}
	?>

	</uservideolist>
</seyretxml>